// 这里放组件的props及公共方法
import type { ExtractInnerPropTypes, ExtractPublicPropTypes } from '@qi-ui-plus/utils'
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DefineComponent, HTMLAttributes } from 'vue'

import { IxPropTypes } from '@qi-ui-plus/utils'

export type {{properCase name}}Mode = 'primary' | 'default' | 'dashed' | 'text' | 'link'
export type {{properCase name}}Shape = 'circle' | 'round'
export type {{properCase name}}Size = 'lg' | 'xl' | 'md' | 'sm' | 'xs'
export type {{properCase name}}Type = 'button' | 'submit' | 'reset'

export const {{name}}Props = {
  mode: IxPropTypes.oneOf<{{properCase name}}Mode>(['primary', 'default', 'dashed', 'text', 'link']),
  danger: IxPropTypes.bool,
  ghost: IxPropTypes.bool,
  disabled: IxPropTypes.bool,
  loading: IxPropTypes.bool,
  size: IxPropTypes.oneOf<{{properCase name}}Size>(['lg', 'xl', 'md', 'sm', 'xs']),
  shape: IxPropTypes.oneOf<{{properCase name}}Shape>(['circle', 'round']),
  block: IxPropTypes.bool,
  icon: IxPropTypes.string,
  type: IxPropTypes.oneOf<{{properCase name}}Type>(['button', 'submit', 'reset']).def('button'),
}

export type {{properCase name}}Props = ExtractInnerPropTypes<typeof {{name}}Props>
export type {{properCase name}}PublicProps = ExtractPublicPropTypes<typeof {{name}}Props>
export type {{properCase name}}Component = DefineComponent<
  Omit<ButtonHTMLAttributes | AnchorHTMLAttributes, keyof {{properCase name}}PublicProps> & {{properCase name}}PublicProps
>
export type {{properCase name}}Instance = InstanceType<DefineComponent<{{properCase name}}Props>>